package com.boss.example.service.impl;

import com.boss.example.entity.dto.MenusDTO;
import com.boss.example.mapper.MenusMapper;
import com.boss.example.service.MenusService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class MenusServiceImpl implements MenusService {

    @Resource
    private MenusMapper menuMapper;

    @Override
    public int updateRolesMenu(MenusDTO menusDTO) {
        return menuMapper.updateRolesMenu(menusDTO);
    }

    @Override
    public int insertRolesMenu(MenusDTO menusDTO) {
        return menuMapper.insertRolesMenu(menusDTO);
    }

    @Override
    public int deleteRolesMenu(Integer menuId) {
        return menuMapper.deleteRolesMenu(menuId);
    }

    @Override
    public List<MenusDTO> getMenuByRoleId(Integer roleId) {
        return menuMapper.getMenuByRoleId(roleId);
    }

}
